import { Text, StyleSheet } from 'react-native'
import { appHosts } from '@/utils/inject'

const AppVersion = () => {
  const isTest = /t\.c\.m/.test(appHosts.c_m_163_com) || /api-test/.test(appHosts.api_mifengs_com)

  return isTest && <Text style={styles.AppVersion}>1.0.2</Text>
}

const styles = StyleSheet.create({
  AppVersion: {
    color: 'red',
    position: 'absolute',
    zIndex: 9999,
    right: 20,
    bottom: 150,
    fontWeight: 'bold',
  },
})

export default AppVersion
